function Team(){
    var id;
    var name;
    var score;
    var groupId;

    this.setId = function(teamId){
        id = teamId;
    }

    this.getId = function(){
        return id;
    }
    
    this.setName = function(teamName){
        name = teamName;
    }

    this.getName = function(){
        return name;
    }
    
    this.setScore = function(newScore) {
        score = newScore;
    }

    this.getScore = function() {
        return score;
    }

    this.setGroupId = function(newGroupId) {
        groupId = newGroupId;
    }

    this.getGroupId = function() {
        return groupId;
    }
}

Team.prototype.getDatabaseObject = function(){
    return {
        id      : this.getId(),
        name    : this.getName(),
        score   : this.getScore(),
        groupId : this.getGroupId()
    };
}

Team.prototype.convertToBusinessObject = function(dbObject){
    this.setId(dbObject.id);
    this.setName(dbObject.name);
    this.setScore(dbObject.score);
    this.setGroupId(dbObject.groupId);
}